RegistrySupplier

@ApiStatus.Experimental
interface RegistrySupplier<T> : Supplier<T>

A reference to a registered object that can supply any of the relevant registry objects (thing, key, id, entry)

Author

fzzyhmstrs

Since

0.5.9

Parameters

T

the registered object type

Functions

Link copied to clipboard
abstract fun get(): T
Link copied to clipboard
abstract fun getEntry(): RegistryEntry<T>

The objects RegistryEntry. This will be a RegistryEntry.Reference, so can be used in Codecs and so on.

Link copied to clipboard
abstract fun getId(): Identifier

The objects Identifier

Link copied to clipboard
abstract fun getKey(): RegistryKey<T>

The objects RegistryKey